package com.datang.pet.common.ossUtils;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-05-14 19:07
 * @notify 上传工具类
 * @version 1.0
 */

import com.datang.pet.common.properties.OssAttr;

public class OssUtil {

    /*
     * @author 顶风少年
     * @date 2019/5/14 19:26
     * @mail dfsn199703132038@foxmail.com
     * @throws
     * @param
     * @param type 1 图片 2 视频 3 音频
     * @result java.lang.String
     * @notify 获取存储空间
     * version 1.0
     */
    public static String getBucketName(Integer type) {
        if (type == 1) {
            return OssAttr.IMAGEBUCKET;
        } else if (type == 2) {
            return OssAttr.VIDEOBUCKET;
        } else if(type==3){
            return OssAttr.BGMBUCKET;
        }else{
            return OssAttr.GIVEPETBUCKET;
        }
    }

    /*
     * @author 顶风少年
     * @date 2019/5/14 23:40
     * @mail dfsn199703132038@foxmail.com
     * @throws
     * @param
     * @param type
     * @result java.lang.String
     * @notify 获取存储路径
     * version 1.0
     */
    public static String getBucketUrl(Integer type) {
        if (type == 1) {
            return OssAttr.IMAGEURL;
        } else if (type == 2) {
            return OssAttr.VIDEOURL;
        } else if(type==3) {
            return OssAttr.BGMRL;
        }else{
            return OssAttr.GIVEPETURL;
        }
    }
}
